<?php
namespace Common\Model;
use Think\Model;
class SystemModel extends Model {
    /**
     * model的中文名称
     */
    public $modelName = '系统';

    /**
     * model的icon
     */
    public $modelIcon = 'icon-dashboard';
    
    protected $_auto = [
        ["create_time", "time", 1, "function"],
        ["update_time", "time", 2, "function"],
    ];
    protected $_validate = [
        ["id", "require", "ID必须填写!"],
        ["name", "require", "系统名称必须填写!"],
        ["description", "require", "系统描述必须填写!"],
        ["keyword", "require", "系统关键字必须填写!"],
        ["create_time", "require", "创建时间必须填写!"],
        ["update_time", "require", "更新时间必须填写!"],
    ];
    public $fieldMap = [
        "id"=>[
            "type"=>"input",
            "name"=>"ID",
            "content"=>"",
            "list_specify"=>"",
            "list"=>true,
            "search"=>true,
            "input"=>false,
            "required"=>true,
        ],
        "name"=>[
            "type"=>"input",
            "name"=>"系统名称",
            "content"=>"",
            "list_specify"=>"",
            "list"=>true,
            "search"=>true,
            "input"=>true,
            "required"=>true,
        ],
        "description"=>[
            "type"=>"textarea",
            "name"=>"系统描述",
            "content"=>"",
            "list_specify"=>"",
            "list"=>true,
            "search"=>false,
            "input"=>true,
            "required"=>true,
        ],
        "keyword"=>[
            "type"=>"input",
            "name"=>"系统关键字",
            "content"=>"",
            "list_specify"=>"",
            "list"=>true,
            "search"=>false,
            "input"=>true,
            "required"=>true,
        ],
        "logo"=>[
            "type"=>"file",
            "name"=>"系统logo",
            "content"=>"",
            "list_specify"=>"",
            "list"=>true,
            "search"=>false,
            "input"=>true,
            "required"=>true,
        ],
        "create_time"=>[
            "type"=>"input",
            "name"=>"创建时间",
            "content"=>"",
            "list_specify"=>"",
            "list"=>false,
            "search"=>false,
            "input"=>false,
            "required"=>true,
        ],
        "update_time"=>[
            "type"=>"input",
            "name"=>"更新时间",
            "content"=>"",
            "list_specify"=>"",
            "list"=>false,
            "search"=>false,
            "input"=>false,
            "required"=>true,
        ],
    ];
}
